package com.example.flowermall.service.impl;

import com.example.flowermall.entity.IndexImg;
import com.example.flowermall.mapper.IndexImgMapper;
import com.example.flowermall.service.IIndexImgService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xiaoman
 * @since 2023-06-15
 */
@Service
public class IndexImgServiceImpl extends ServiceImpl<IndexImgMapper, IndexImg> implements IIndexImgService {
    private final IndexImgMapper imgMapper;

    public IndexImgServiceImpl(IndexImgMapper imgMapper) {
        this.imgMapper = imgMapper;
    }

    @Override
    public void addImg(IndexImg img) {
        imgMapper.insert(img);
    }

    @Override
    public void deleteImg(Integer id) {
        imgMapper.deleteById(id);
    }
}
